
<h1>Лигүүд</h1>

<?php echo link_to('жагсаалт', 'league/index', array('class'=>'title'))?> 
<span class="separator"> | </span>
<?php echo link_to('шинээр нэмэх', 'league/new', array('class'=>'title'))?>
<br clear="all">
<br clear="all">

<table width="100%">
  <thead>
    <tr>
      <th>#</th>
      <th>Лого</th>
      <th>Нэр</th>
      <th>Лигийн Тухай</th>
      <th>Published</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <?php $i=0; foreach ($bb_leagues as $bb_league): ?>
    <tr>
      <td><?php echo ++$i ?></td>
      <td><?php echo image_tag('/uploads/league/'.$bb_league->getLogo(), array('style'=>'max-width:200px;max-height:150px;')) ?></td>      
      <td><?php echo $bb_league->getName() ?></td>
      <td><?php echo $bb_league->getDescr() ?></td>
      <td><?php echo $bb_league->getPublished() ?></td>
      <td nowrap>
        <a href="<?php echo url_for('league/edit?id='.$bb_league->getId()) ?>">Засварлах</a><br><br>
        <a onclick="return confirm('Та итгэлтэй байна уу?')" href="<?php echo url_for('league/delete?id='.$bb_league->getId()) ?>">Устгах</a>
      </td>   
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>


